<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Process page</title>
<%@ include file="/common.jsp" %>
<style>
	.td_left {text-align:left;}
	.td_right {text-align:right;}
</style>
</head>
<body>
	<div>
		<div style="margin-top: 50px;width: 100%;">
			<div style="text-align: center;"><font style="font-size: 28px;">Process Page</font></div>
			<hr>
			<div style="margin-top: 50px;text-align: center; border: 1px solid gray; 
				width: 500px;height: 650px;margin-left: 685px;">
				<form action="${ctx }/sec/process" method="post">
					<input type="hidden" value="${merchant.id }" name="id"/>
					<table style="margin-left: 40px;" >
						<tr>
							<td class="td_right">Name:</td>
							<td class="td_left">${merchant.name }</td>
						</tr>
						<tr>
							<td class="td_right">ID Card:</td>
							<td class="td_left">
								<img src="${ctx }/sec/image${merchant.idcard }" width="200px" height="150px">
							</td>
						</tr>
						<tr>
							<td class="td_right">Head:</td>
							<td class="td_left">
								<img src="${ctx }/sec/image${merchant.heading }" width="140px" height="120px">
							</td>
						</tr>
						<tr>
							<td class="td_right">Address:</td>
							<td class="td_left">${merchant.address }</td>
						</tr>
						<c:if test="${merchant.status==2 }">
							<tr>
								<td class="td_right">Opinion:</td>
								<td class="td_left">
									<select name="result">
										<option value="1">Agree</option>
										<option value="2" selected="selected">Reject</option>
									</select>
								</td>
							</tr>
						</c:if>
						<c:if test="${merchant.status==1 || merchant.status==0}">
							<tr>
								<td class="td_right">Reason:</td>
								<td class="td_left">
									<select name="result">
										<option value="1" selected="selected">Agree</option>
										<option value="2">Reject</option>
									</select>
								</td>
							</tr>
						</c:if>
						<tr>
							<td class="td_right">Reason:</td>
							<td class="td_left">
								<textarea rows="6" cols="42" name="bcontent" placeholder="Under 100 words">${merchant.bContent }</textarea>
							</td>
						</tr>
				</table>
				<div style="width: 80%;text-align: right;margin-top: 20px;">
					<input type="submit" value="Submit" class="detail"/>
				</div>
				
				</form>
				<div style="width: 80%;text-align: right; ">
					<button onclick="window.location.href='${ctx}/sec/pendingList'" class="detail">Return</button>
				</div>
				<div style="margin-top: 20px;"><font style="color: red;">${editError }</font></div>
			</div>
		</div>
	</div>
</body>
</html>